<template>
  <div class="buy-car-top">
    <h1>购物车首页</h1>
    <div class="select">
      <router-link to="/product-list">
        <el-button type="primary" class="left">商品列表</el-button>
      </router-link>
      <router-link to="/buy-car">
        <el-button type="primary">购物车</el-button>
      </router-link>
    </div>
    <div class="show-table">
      <router-view></router-view>
    </div>
  </div>
</template>

<script setup>
import { RouterView, RouterLink } from 'vue-router'
</script>

<style lang="scss" scoped>
.buy-car-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  width: 100%;
  .select {
    margin-top: 20px;
  }
  .select .left {
    margin-right: 20px;
  }
  .show-table {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
  }
}
</style>